package com.moke.util.mouse
{
	import flash.display.DisplayObject;

	public class MouseUtil
	{
		/**
		 * 使 displayObject 对象跟随鼠标当前的位置转向
		 * 
		 */ 
		public static function followMouse(mouseX:Number,
										   mouseY:Number,
										   displayObject:DisplayObject):void
		{
			var dx:Number = mouseX - displayObject.x ;
			var dy:Number = mouseY - displayObject.y ;
			displayObject.rotation = Math.atan2(dy,dx) * 180 / Math.PI
		}
	}
}